########################################################################
#
#                 Langlet configuration
#
########################################################################



##################  automatically generated ############################

# Warning! do not touch this. This section is automatically generated by fs.py

LANGLET_OFFSET = 4096


#################    generic section  ##################################

import sys
import os

from lexdef.lex_token import LexerToken as lex_token
import lexdef.lex_nfa    as lex_nfa
import lexdef.lex_symbol as lex_symbol
import parsedef.parse_nfa as parse_nfa
import parsedef.parse_symbol as parse_symbol
import parsedef.parse_token as parse_token

nfamodule = parse_nfa
symbol    = parse_symbol
token     = parse_token

import EasyExtend
from EasyExtend.eetransformer import Transformer, transform, transform_dbg
from EasyExtend.csttools      import pprint

from EasyExtend.fstools import FSConfig
FSConfig.langlet_table.append( {"offset":LANGLET_OFFSET,
                                "symbol": symbol,
                                "token": token} )
def tokenize(source):
    '''
    Tokenize source string and return token stream.
    '''
    from EasyExtend.eecommon import tokenize
    import langlet
    return tokenize(langlet, source)

def parse(source, start_symbol = None):
    '''
    Parse source string and return CST.
    '''
    from EasyExtend.eecommon import parse
    import langlet
    return parse(langlet, source, start_symbol = start_symbol)


from EasyExtend.cst2source import Unparser
unparse = Unparser(symbol, token, offset = LANGLET_OFFSET)

sys.path.append((os.sep).join(symbol.__file__.split(os.sep)[:-3]))

#############   user edible section  ##################################

from EasyExtend.eeoptions import getoptions
opt = getoptions()

# additional options can be defined here

options = {}

# extension for compiled modules. Default is .pyc

compiled_ext = ".pyc"

# extension for source modules. Default is .py

source_ext = ".py"

# prompt. Default prompt is '>>>'

prompt = ">>> "

# langlet name

langlet_name = "gram_langlet"

########################################################################


